home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 101-125 / scopedisk122 / popup / source / globals.c < prev    next >
C/C++ Source or Header  |  1995-03-19  |  2KB  |  116 lines

  1. #include "PopUpMenu.h"
  2.  
  3. /* Library base pointers */
  4. struct DosLibrary    *DOSBase;
  5. struct IntuitionBase *IntuitionBase;
  6. struct GfxBase         *GfxBase;
  7. struct LayersBase    *LayersBase;
  8.  
  9. /* Our semaphore */
  10. struct SignalSemaphore PopUpSemaphore;
  11.  
  12. /* Pointers to intuition functions */
  13. __fptr OldSetMenuStrip, OldClearMenuStrip, OldOnMenu, OldOffMenu;
  14.  
  15. /* The menuwindows */
  16. struct WindowData MenuWindow, ItemWindow, SubWindow;
  17.  
  18. /* The currently select items */
  19. struct MenuItem   *CurrentSubItem, *CurrentItem, *TempItem;
  20. struct Menu      *CurrentMenuPtr;
  21. UWORD          CurrentMenuNr;
  22.  
  23. /* Size of the font used to draw the menues */
  24. UWORD          MenuFontSize;
  25.  
  26. /* Mouse position on screen */
  27. UWORD          MouseX,MouseY;
  28.  
  29. /* device request blocks */
  30. struct IOStdReq *InputReqBlock;
  31. struct timerequest *TimerReqBlock;
  32.  
  33. /* Pointer to the menus to use */
  34. struct Menu    *Menues;
  35.  
  36. /* Variables to hold the last selection */
  37. struct Window    *LastWindow;
  38. WORDBITS LastSelected;
  39.  
  40. /* Screen to draw on */
  41. struct Screen    *Screen;
  42.  
  43. BOOL        ScreenType;
  44.  
  45. /* A copy (almost) of the screens rastport */
  46. struct RastPort Rp;
  47.  
  48. /* Window with menues to use */
  49. struct Window    *ActiveWindow;
  50. BPTR        StdOut;
  51. BPTR        PopUpSeg;
  52.  
  53.  
  54. UWORD chip AmigaKeyHighRes[] = {
  55.   0xc000, 0x0600,
  56.   0x0003, 0xc000,
  57.   0x000f, 0xc000,
  58.   0x0039, 0xc000,
  59.   0x00e1, 0xc000,
  60.   0x03ff, 0xc000,
  61.   0x1f83, 0xf000,
  62.   0xc000, 0x0600
  63. };
  64.  
  65. UWORD chip AmigaKeyLoRes[] = {
  66.   0x8004,
  67.   0x00e0,
  68.   0x01e0,
  69.   0x0360,
  70.   0x0660,
  71.   0x0fe0,
  72.   0x3cf0,
  73.   0x8004
  74. };
  75.  
  76. UWORD chip SubItemPointerL[] = {
  77.   0x7000,
  78.   0x3000,
  79.   0x1000,
  80.   0x0000,
  81.   0x1000,
  82.   0x3000,
  83.   0x7000
  84. };
  85.  
  86. UWORD chip SubItemPointerH[] = {
  87.   0x3f00,
  88.   0x0f00,
  89.   0x0300,
  90.   0x0000,
  91.   0x0300,
  92.   0x0f00,
  93.   0x3f00
  94. };
  95.  
  96. /* these doesn't need to be in chip-ram but it's the easiest way to
  97.    get Blink to create a BSS hunk */
  98.  
  99. struct Image chip MyAmigaKeyImage[2] = {
  100.   /*  Pos   Size Depth      Data        Pick OnOff  Next */
  101.   {-25, 0, 23, 8,  1,    AmigaKeyHighRes,  1,   0,   NULL},
  102.   {-16, 0, 14, 8,  1,    AmigaKeyLoRes,      1,   0,   NULL}
  103. };
  104.  
  105. struct Image chip MySubItemImage[2] = {
  106.   /*  Pos   Size Depth      Data        Pick OnOff  Next */
  107.   {  2, 0,  8, 7,  1,    SubItemPointerH,  1,  0,   NULL},
  108.   {  1, 0,  4, 7,  1,    SubItemPointerL,  1,  0,   NULL}
  109. };
  110.  
  111. UWORD chip GhostPattern[]  = { 0x1111, 0x4444 };
  112. UWORD chip NormalPattern[] = { 0xffff, 0xffff };
  113.  
  114. STRPTR chip PopUpTaskName = "PopUpMenu";
  115.  
  116.